package com.information.manage.basic.dataOperator;

import com.information.manage.basic.model.entity.SysUserDO;
import com.information.manage.basic.common.recycling.RecoveryDataOperateManager;
import com.information.manage.basic.common.recycling.RecoveryDataOperator;
import com.information.manage.basic.mapper.SysUserMapper;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

@Component
public class SysUserDataOperator implements RecoveryDataOperator {

    @Resource
    private RecoveryDataOperateManager recoveryDataOperateManager;

    @Resource
    private SysUserMapper sysUserMapper;

    @PostConstruct
    private void init(){
        recoveryDataOperateManager.addDataOperate(this);
    }

    @Override
    public void deleteData(Class entityClass, List<Integer> ids) {
        sysUserMapper.deleteBatchIds(ids);
    }

    @Override
    public List<Class> dependencies() {
        return Collections.EMPTY_LIST;
    }

    @Override
    public Class getEntityClass() {
        return SysUserDO.class;
    }

}
